/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.celephais.objectGenerator.fileGenerators;

import com.celephais.objectGenerator.ObjectGenerator;
import java.io.File;

/**
 * @author Eugene Shen
 */
public class ClientServiceGenerator extends FileGenerator {

	protected static final String CLIENT_SERVICE_TEMPL_DIR = "templates" + File.separator + "clientService" + File.separator;

	public ClientServiceGenerator(ObjectGenerator parent) {
		super(parent);
	}

	@Override
	public String getTemplateDir() {
		return CLIENT_SERVICE_TEMPL_DIR;
	}

	@Override
	public String generateAdditional(String fileContents) {
		String servicePath = objName.toLowerCase();
		return fileContents.replace("%servicePath%", servicePath);
	}

	@Override
	public String getFileName(String baseClassName) {
		return baseClassName + "Service";
	}

	@Override
	public String getOutputDir(String srcDir) {
		return srcDir + File.separator + "client" + File.separator + "service";
	}

}
